﻿/**
 *    Copyright 2006 - 2011 Opera Software ASA
 *
 *    Licensed under the Apache License, Version 2.0 (the "License");
 *    you may not use this file except in compliance with the License.
 *    You may obtain a copy of the License at
 *
 *        http://www.apache.org/licenses/LICENSE-2.0
 *
 *    Unless required by applicable law or agreed to in writing, software
 *    distributed under the License is distributed on an "AS IS" BASIS,
 *    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 *    See the License for the specific language governing permissions and
 *    limitations under the License.
 *
 **/


cls.CookieManager.create_ui_widgets = function()
{
  window.eventHandlers.dblclick['cookiemanager-init-edit-mode'] = function(event, target)
  {
    this.broker.dispatch_action("cookie_manager", "enter-edit-mode", event, target);
  }

  window.eventHandlers.click['cookiemanager-row-select'] = function(event, target)
  {
    this.broker.dispatch_action("cookie_manager", "select-row", event, target);
  }

  window.eventHandlers.click['cookiemanager-container'] = function(event, target)
  {
    this.broker.dispatch_action("cookie_manager", "check-to-exit-edit-mode", event, target);
  }

  window.eventHandlers.click['cookiemanager-add-cookie-row'] = function(event, target)
  {
    this.broker.dispatch_action("cookie_manager", "add-cookie", event, target);
  }
}
